<%@ page import="java.util.ArrayList" %>
<%@ page import="com.molin.bean.Student" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>显示学生信息</title>
    <style>
        table,tr,th,td{
            border: 1px solid red;
            margin: 0;
            border-collapse: collapse;
        }
    </style>
</head>
<body>
<% ArrayList<Student> studentArrayList = (ArrayList<Student>) session.getAttribute("studentArrayList"); %>

<%--    遍历集合，将学生信息显示在表格中--%>
<table>
    <tr>
        <th>学生姓名</th>
        <th>学生年龄</th>
        <th>学生成绩</th>
    </tr>
    <% for (Student student : studentArrayList) { %>
    <tr>
        <td><%=student.getName()%></td>
        <td><%=student.getAge()%></td>
        <td><%=student.getScore()%></td>
    </tr>
    <% } %>

</table>

</body>
</html>
